package cn.gg.benchmark.cases;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;

import cn.gg.benchmark.util.ArrayList;

/**
 * <code>NonGraphicsCase</code>代表那些非图形测试的项目。<br>
 * 这种测试项目往往测试的是与图形无关的内容，因此在用户界面上采用统一的界面就OK<br>
 * <code>NonGraphicsCase</code>提供了这么一个统一的界面，大体上为上面显示动画，下面显示信息。
 * 
 * @author Jarod Yv
 */
public abstract class NonGraphicsCase extends Canvas implements IBenchmarkable,
		Runnable {
	public static final byte TYPE_MULTI = 0x01;
	public static final byte TYPE_CPU = 0x02;
	public static final byte TYPE_NET = 0x03;
	public static final byte TYPE_IO = 0x04;
	public static final int MAX_LINE = 3;
	/* 测试的类型，测试的类型决定动画的类型 */
	private byte benchType;
	/* 测试信息 */
	private ArrayList info;

	public void benchmark() {
		new Thread(this).start();
	}

	protected void paint(Graphics g) {

	}

	public byte getBenchType() {
		return benchType;
	}

	public void setBenchType(byte benchType) {
		this.benchType = benchType;
	}

}
